<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>串口设置</title>
</head>
<body>
<button style="display: none" id="USP-Button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#updateSerialPo"></button>
<div class="modal fade" id="updateSerialPo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span style="font-size: 25px">修改串口信息</span>
            </div>
            <div id="USPModalBody" class="modal-body">
                <!--模态框框体-->
            </div>
            <div id="USPModalFoot" class="modal-footer">
                <!--模态框脚-->
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<div class="content-wrapper">
    <div class='row' style='margin-bottom: -50px'>
        <div class="col-lg-12 grid-margin stretch-card">
            <div class="card">
                <div class='card-body' style="padding: 50px;" >
                    <div class="col-md-12">
                        <div class="updateMenu-title-left" style="margin-left: 0px">
                            <h4 class="card-title" style="width: 300px;font-size: 25px">串口信息</h4>
                            <p class="card-description" style="width: 300px;margin-bottom: 0px">
                                用户所在公司注册的串口信息
                            </p>
                        </div>
                        <button class="btn btn-success" onclick="insertSerialPO()">添加</button>
                        <div class="table-responsive" th:if="${Serials.size()} ne 0">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>数据名</th>
                                    <th>经过处理</th>
                                    <th>串口号</th>
                                    <th>波特率</th>
                                    <th>校验位</th>
                                    <th>数据位</th>
                                    <th>停止位</th>
                                    <th style="text-align:center">操作</th>
                                </tr>
                                </thead>
                                <tbody id="setUpSerialPo_tbody">
                                <tr th:each="serial,iterStat:${Serials}">
                                    <td name="parm" style="padding: 20px 0px 20px 20px">
                                        <span th:text="${serial.parm.name}" ></span>
                                    </td>
                                    <td name="ishandled" style="padding: 0px 0px 0px 20px">
                                        <span th:text="${serial.handled}"></span>
                                    </td>
                                    <!--<td style="padding: 0px 0px 0px 20px">-->
                                        <!--<span th:text="${iterStat.index}"></span>-->
                                    <!--</td>-->
                                    <td name="serialNumber" style="padding: 0px 0px 0px 20px">
                                        <span th:text="${serial.serialNumber}"></span>
                                    </td>
                                    <td name="baudRate" style="padding: 0px 0px 0px 20px">
                                        <span th:text="${serial.baudRate}"></span>
                                    </td>
                                    <td name="checkoutBit" style="padding: 0px 0px 0px 20px">
                                        <span  th:text="${serial.checkoutBit}"></span>
                                    </td>
                                    <td name="dataBit" style="padding: 0px 0px 0px 20px">
                                        <span th:text="${serial.dataBit}"></span>
                                    </td>
                                    <td name="stopBit" style="padding: 0px 0px 0px 20px">
                                        <span th:text="${serial.stopBit}"></span>
                                    </td>
                                    <td style="text-align: center;padding-top: 15px;padding-bottom: 15px">
                                        <button class="update-menu-delete btn btn-danger btn-rounded" onclick="">删除</button>
                                        <button class="update-menu-update btn btn-info btn-rounded" th:onclick="'updateSerialPo('+${iterStat.index}+')'" >修改</button>
                                    </td>
                                </tr>
                                <tr><td></td><td></td><td></td><td></td></tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="col-md-12" th:if="${Serials.size()} eq 0" >
                            <h5>您还没有在我公司注册串口，快来注册吧！</h5>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!--<div id="updateParms" class="content-wrapper">-->
    <!--<div class='row' style='margin-bottom: -50px'>-->
        <!--<div class='col-5 col-xl-11 grid-margin stretch-card'>-->
            <!--<div class='row w-100 flex-grow'>-->
                <!--<div class='col-md-12 grid-margin stretch-card'>-->
                    <!--<div class='card' id=''>-->
                        <!---->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
<!--</div>-->
</body>
</html>